package com.fitso.model.calculator.idealweight;

import com.fitso.model.bean.Body;
import com.fitso.model.bean.Body.Sex;
import com.fitso.model.bean.measure.length.Foot;
import com.fitso.model.bean.measure.length.Length;
import com.fitso.model.bean.measure.mass.KiloGram;
import com.fitso.model.bean.measure.mass.Mass;
import com.fitso.model.calculator.IdealWeightCalculator;

/**
 * Implementation of {@link IdealWeightCalculator} that starts at a middle
 * weight and has a medium slope than either Divine or Robinson. Like the Miller
 * this calculation is difficult and possibly dangerous for taller men, but is
 * ideal for most women.
 * 
 * @author timothystorm
 * 
 */
public class RobinsonIdealWeightCalculator extends AbstractIdealWeightCalculator implements IdealWeightCalculator {
	protected Mass getRootWeight(Body body) {
		return new KiloGram(body.getSex() == Sex.MALE ? 52.0 : 49.0);
	}

	protected Mass getWeightMultiplier(Body body) {
		return new KiloGram(body.getSex() == Sex.MALE ? 1.9 : 1.7);
	}

	protected Length getMedianHeight(Body body) {
		return new Foot(5.0);
	}
}
